package com.eclipse.e0112_io.Files;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

public class 读取文件 {
	public static void main(String[] args) throws IOException {
		List<String> lines = Files.readAllLines(Paths.get("/Users/liuzhuangzhuang/Desktop/io/test/b.txt"));
		
		//遍历文件所有行
		for (String line : lines) {
			System.out.println(line);
		}
		//读取文件第一行
		//System.out.println(lines.get(1));
	}
	
	
}
